package com.cw1.protoType;

/**
 * @Author qiuMi
 * @description 测试 - 深/浅拷贝
 * @Date 2022-10-08 22:00
 **/
public class TestCopy {
    public static void main(String[] args) {
        Sheep sheep = new Sheep("tom", 1, "白色");
        sheep.childSheep = new Sheep ("jack", 2, "黑色");

        // 这里是浅拷贝
        Sheep cloneSheep = (Sheep) sheep.clone();
        System.out.println("cloneSheep" + cloneSheep);

        //
    }
}
